//
//  GCMSLRTableViewCell.m
//  GeeCityManager
//
//  Created by 聚城科技 on 16/3/23.
//  Copyright © 2016年 聚城科技. All rights reserved.
//

#import "GCMSLRTableViewCell.h"

@implementation GCMSLRTableViewCell {
    
    UIView * _bgView;
    UILabel *_ZWLabel;
    UILabel *_GLCLabel;
    UILabel *_GLRYLabel;
    
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self createUI];
    }
    return self;
}

-(void)createUI{
    
    _bgView = [[UIImageView alloc]init];
    _bgView.frame =CGRectMake(5, 0,SCREEN_WIDTH - 10, 40);
    _bgView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:_bgView];
    
    _ZWLabel = [[UILabel alloc]init];
    _ZWLabel.frame = CGRectMake(0,0,_bgView.bounds.size.width / 4, 40);
    _ZWLabel.font = [UIFont systemFontOfSize:14];
    //    _titleLabel.textColor = [UIColor lightGrayColor];
    _ZWLabel.textAlignment = NSTextAlignmentCenter;
    [_bgView addSubview:_ZWLabel];
    
    _GLCLabel = [[UILabel alloc]init];
    _GLCLabel.frame = CGRectMake(_bgView.bounds.size.width / 4, 0 ,_bgView.bounds.size.width / 2, 40);
    _GLCLabel.font = [UIFont systemFontOfSize:13];
    //    _titleLabel.textColor = [UIColor lightGrayColor];
    _GLCLabel.textAlignment = NSTextAlignmentCenter;
    [_bgView addSubview:_GLCLabel];
    
    _GLRYLabel = [[UILabel alloc]init];
    _GLRYLabel.frame = CGRectMake(_bgView.bounds.size.width / 4 *3,0,_bgView.bounds.size.width / 4 , 40);
    _GLRYLabel.font = [UIFont systemFontOfSize:14];
    //    _titleLabel.textColor = [UIColor lightGrayColor];
    _GLRYLabel.textAlignment = NSTextAlignmentCenter;
    [_bgView addSubview:_GLRYLabel];
    
}

-(void)setSlrModel:(GCMSLRModel *)slrModel{
    
    _slrModel = slrModel;
    _ZWLabel.text = _slrModel.name;
    _GLCLabel.text = _slrModel.depart;
    _ZWLabel.textColor = [UIColor lightGrayColor];
    _GLRYLabel.text = _slrModel.position;
    _GLRYLabel.textColor = [UIColor lightGrayColor];
    
    
    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
